<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, user-scalable=no">
  <meta name="description" content="API docs for the Name class from the name library, for the Dart programming language.">
  <title>Name class - name library - Dart API</title>


  
  <link rel="preconnect" href="https://fonts.gstatic.com">
  <link href="https://fonts.googleapis.com/css2?family=Roboto+Mono:ital,wght@0,300;0,400;0,500;0,700;1,400&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@48,400,0,0" rel="stylesheet">
  
  <link rel="stylesheet" href="../static-assets/github.css?v1">
  <link rel="stylesheet" href="../static-assets/styles.css?v1">
  <link rel="icon" href="../static-assets/favicon.png?v1">

  
</head>


<body data-base-href="../" data-using-base-href="false" class="light-theme">

<div id="overlay-under-drawer"></div>

<header id="title">
  <span id="sidenav-left-toggle" class="material-symbols-outlined" role="button" tabindex="0">menu</span>
  <ol class="breadcrumbs gt-separated dark hidden-xs">
    <li><a href="../index.html">flutter_contacts</a></li>
    <li><a href="../properties_name/properties_name-library.html">name</a></li>
    <li class="self-crumb">Name class</li>
  </ol>
  <div class="self-name">Name</div>
  <form class="search navbar-right" role="search">
    <input type="text" id="search-box" autocomplete="off" disabled class="form-control typeahead" placeholder="Loading search...">
  </form>
  <div class="toggle" id="theme-button">
    <label for="theme">
      <input type="checkbox" id="theme" value="light-theme">
      <span id="dark-theme-button" class="material-symbols-outlined">
        brightness_4
      </span>
      <span id="light-theme-button" class="material-symbols-outlined">
        brightness_5
      </span>
    </label>
  </div>
</header>
<main>

  <div id="dartdoc-main-content" class="main-content">
      <div>
<h1><span class="kind-class">Name</span> class 
 
</h1></div>

    
<section class="desc markdown">
  <p>Structured name.</p>
<p>Name structure varies widely by country. See:
https://en.wikipedia.org/wiki/Personal_name#Structure</p>
<p>Data models such as those from Android and iOS are typically US-centric and
include middle name, prefix, suffix, etc. They also always include a
formatted displayed, which we recommend to use instead. That said, other
fields are included for compatibility, except for first and last names which
are common in most countries.</p>
<p>Since display name is always part of the top-level contact, it's not
included here.</p>
<p>Note that Android allows multiple names, while iOS allows only one. However
use cases for multiple names are debatable, especially since there is no
notion of "primary" name even on Android, and it is very common to see
multiple identical instances of the same name for the same contact. For all
those reasons, we only support one name per contact.</p>
<p>Note also that on iOS, nickname is included in the name fields (and again
only one is allowed), while on Android nickname is a separate data model and
one contact can have multiple nicknames, independent of their names. They
can also have distinct labels to indicate what type of nickname they are
(maiden name, short name, initials, default, other or any custom label). To
simplify, we only consider nickname as just another name field, and
disregard nickname labels.</p>
<table>
<thead>
<tr>
<th>Field</th>
<th align="center">Android</th>
<th align="center">iOS</th>
</tr>
</thead>
<tbody>
<tr>
<td>first</td>
<td align="center">✔</td>
<td align="center">✔</td>
</tr>
<tr>
<td>last</td>
<td align="center">✔</td>
<td align="center">✔</td>
</tr>
<tr>
<td>middle</td>
<td align="center">✔</td>
<td align="center">✔</td>
</tr>
<tr>
<td>prefix</td>
<td align="center">✔</td>
<td align="center">✔</td>
</tr>
<tr>
<td>suffix</td>
<td align="center">✔</td>
<td align="center">✔</td>
</tr>
<tr>
<td>nickname</td>
<td align="center">✔</td>
<td align="center">✔</td>
</tr>
<tr>
<td>firstPhonetic</td>
<td align="center">✔</td>
<td align="center">✔</td>
</tr>
<tr>
<td>lastPhonetic</td>
<td align="center">✔</td>
<td align="center">✔</td>
</tr>
<tr>
<td>middlePhonetic</td>
<td align="center">✔</td>
<td align="center">✔</td>
</tr>
</tbody>
</table>
</section>



    
  <section class="summary offset-anchor" id="constructors">
    <h2>Constructors</h2>

    <dl class="constructor-summary-list">
        <dt id="Name" class="callable">
          <span class="name"><a href="../properties_name/Name/Name.html">Name</a></span><span class="signature">(<span class="parameter" id="-param-first">{<span class="type-annotation"><a href="https://api.flutter.dev/flutter/dart-core/String-class.html">String</a></span> <span class="parameter-name">first</span> = <span class="default-value">&#39;&#39;</span>, </span><span class="parameter" id="-param-last"><span class="type-annotation"><a href="https://api.flutter.dev/flutter/dart-core/String-class.html">String</a></span> <span class="parameter-name">last</span> = <span class="default-value">&#39;&#39;</span>, </span><span class="parameter" id="-param-middle"><span class="type-annotation"><a href="https://api.flutter.dev/flutter/dart-core/String-class.html">String</a></span> <span class="parameter-name">middle</span> = <span class="default-value">&#39;&#39;</span>, </span><span class="parameter" id="-param-prefix"><span class="type-annotation"><a href="https://api.flutter.dev/flutter/dart-core/String-class.html">String</a></span> <span class="parameter-name">prefix</span> = <span class="default-value">&#39;&#39;</span>, </span><span class="parameter" id="-param-suffix"><span class="type-annotation"><a href="https://api.flutter.dev/flutter/dart-core/String-class.html">String</a></span> <span class="parameter-name">suffix</span> = <span class="default-value">&#39;&#39;</span>, </span><span class="parameter" id="-param-nickname"><span class="type-annotation"><a href="https://api.flutter.dev/flutter/dart-core/String-class.html">String</a></span> <span class="parameter-name">nickname</span> = <span class="default-value">&#39;&#39;</span>, </span><span class="parameter" id="-param-firstPhonetic"><span class="type-annotation"><a href="https://api.flutter.dev/flutter/dart-core/String-class.html">String</a></span> <span class="parameter-name">firstPhonetic</span> = <span class="default-value">&#39;&#39;</span>, </span><span class="parameter" id="-param-lastPhonetic"><span class="type-annotation"><a href="https://api.flutter.dev/flutter/dart-core/String-class.html">String</a></span> <span class="parameter-name">lastPhonetic</span> = <span class="default-value">&#39;&#39;</span>, </span><span class="parameter" id="-param-middlePhonetic"><span class="type-annotation"><a href="https://api.flutter.dev/flutter/dart-core/String-class.html">String</a></span> <span class="parameter-name">middlePhonetic</span> = <span class="default-value">&#39;&#39;</span>}</span>)</span>
        </dt>
        <dd>
          
        </dd>
        <dt id="Name.fromJson" class="callable">
          <span class="name"><a href="../properties_name/Name/Name.fromJson.html">Name.fromJson</a></span><span class="signature">(<span class="parameter" id="fromJson-param-json"><span class="type-annotation"><a href="https://api.flutter.dev/flutter/dart-core/Map-class.html">Map</a><span class="signature">&lt;<wbr><span class="type-parameter"><a href="https://api.flutter.dev/flutter/dart-core/String-class.html">String</a></span>, <span class="type-parameter">dynamic</span>&gt;</span></span> <span class="parameter-name">json</span></span>)</span>
        </dt>
        <dd>
          
            <div class="constructor-modifier features">factory</div>
        </dd>
    </dl>
  </section>

    <section class="summary offset-anchor" id="instance-properties">
      <h2>Properties</h2>

      <dl class="properties">
        <dt id="first" class="property">
  <span class="name"><a href="../properties_name/Name/first.html">first</a></span>
  <span class="signature">&#8596; <a href="https://api.flutter.dev/flutter/dart-core/String-class.html">String</a></span> 

</dt>
<dd>
  First name / given name.
  <div class="features"><span class="feature">read / write</span></div>

</dd>

        <dt id="firstPhonetic" class="property">
  <span class="name"><a href="../properties_name/Name/firstPhonetic.html">firstPhonetic</a></span>
  <span class="signature">&#8596; <a href="https://api.flutter.dev/flutter/dart-core/String-class.html">String</a></span> 

</dt>
<dd>
  Phonetic first name.
  <div class="features"><span class="feature">read / write</span></div>

</dd>

        <dt id="hashCode" class="property">
  <span class="name"><a href="../properties_name/Name/hashCode.html">hashCode</a></span>
  <span class="signature">&#8594; <a href="https://api.flutter.dev/flutter/dart-core/int-class.html">int</a></span> 

</dt>
<dd>
  The hash code for this object.
  <div class="features"><span class="feature">read-only</span><span class="feature">override</span></div>

</dd>

        <dt id="last" class="property">
  <span class="name"><a href="../properties_name/Name/last.html">last</a></span>
  <span class="signature">&#8596; <a href="https://api.flutter.dev/flutter/dart-core/String-class.html">String</a></span> 

</dt>
<dd>
  Last name / family name.
  <div class="features"><span class="feature">read / write</span></div>

</dd>

        <dt id="lastPhonetic" class="property">
  <span class="name"><a href="../properties_name/Name/lastPhonetic.html">lastPhonetic</a></span>
  <span class="signature">&#8596; <a href="https://api.flutter.dev/flutter/dart-core/String-class.html">String</a></span> 

</dt>
<dd>
  Phonetic last name.
  <div class="features"><span class="feature">read / write</span></div>

</dd>

        <dt id="middle" class="property">
  <span class="name"><a href="../properties_name/Name/middle.html">middle</a></span>
  <span class="signature">&#8596; <a href="https://api.flutter.dev/flutter/dart-core/String-class.html">String</a></span> 

</dt>
<dd>
  Middle name.
  <div class="features"><span class="feature">read / write</span></div>

</dd>

        <dt id="middlePhonetic" class="property">
  <span class="name"><a href="../properties_name/Name/middlePhonetic.html">middlePhonetic</a></span>
  <span class="signature">&#8596; <a href="https://api.flutter.dev/flutter/dart-core/String-class.html">String</a></span> 

</dt>
<dd>
  Phonetic middle name.
  <div class="features"><span class="feature">read / write</span></div>

</dd>

        <dt id="nickname" class="property">
  <span class="name"><a href="../properties_name/Name/nickname.html">nickname</a></span>
  <span class="signature">&#8596; <a href="https://api.flutter.dev/flutter/dart-core/String-class.html">String</a></span> 

</dt>
<dd>
  Nickname / short name.
  <div class="features"><span class="feature">read / write</span></div>

</dd>

        <dt id="prefix" class="property">
  <span class="name"><a href="../properties_name/Name/prefix.html">prefix</a></span>
  <span class="signature">&#8596; <a href="https://api.flutter.dev/flutter/dart-core/String-class.html">String</a></span> 

</dt>
<dd>
  Prefix / title, e.g. "Dr" in American names.
  <div class="features"><span class="feature">read / write</span></div>

</dd>

        <dt id="runtimeType" class="property inherited">
  <span class="name"><a href="https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html">runtimeType</a></span>
  <span class="signature">&#8594; <a href="https://api.flutter.dev/flutter/dart-core/Type-class.html">Type</a></span> 

</dt>
<dd class="inherited">
  A representation of the runtime type of the object.
  <div class="features"><span class="feature">read-only</span><span class="feature">inherited</span></div>

</dd>

        <dt id="suffix" class="property">
  <span class="name"><a href="../properties_name/Name/suffix.html">suffix</a></span>
  <span class="signature">&#8596; <a href="https://api.flutter.dev/flutter/dart-core/String-class.html">String</a></span> 

</dt>
<dd>
  Suffix, e.g. "Jr" in American names.
  <div class="features"><span class="feature">read / write</span></div>

</dd>

      </dl>
    </section>

    
  <section
      class="summary offset-anchor"
      id="instance-methods">
    <h2>Methods</h2>
    <dl class="callables">
        <dt id="noSuchMethod" class="callable inherited">
  <span class="name"><a href="https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html">noSuchMethod</a></span><span class="signature">(<wbr><span class="parameter" id="noSuchMethod-param-invocation"><span class="type-annotation"><a href="https://api.flutter.dev/flutter/dart-core/Invocation-class.html">Invocation</a></span> <span class="parameter-name">invocation</span></span>)
    <span class="returntype parameter">&#8594; dynamic</span>
  </span>
  

</dt>
<dd class="inherited">
  Invoked when a non-existent method or property is accessed.
  <div class="features"><span class="feature">inherited</span></div>

</dd>

        <dt id="toJson" class="callable">
  <span class="name"><a href="../properties_name/Name/toJson.html">toJson</a></span><span class="signature">(<wbr>)
    <span class="returntype parameter">&#8594; <a href="https://api.flutter.dev/flutter/dart-core/Map-class.html">Map</a><span class="signature">&lt;<wbr><span class="type-parameter"><a href="https://api.flutter.dev/flutter/dart-core/String-class.html">String</a></span>, <span class="type-parameter">dynamic</span>&gt;</span></span>
  </span>
  

</dt>
<dd>
  
  

</dd>

        <dt id="toString" class="callable">
  <span class="name"><a href="../properties_name/Name/toString.html">toString</a></span><span class="signature">(<wbr>)
    <span class="returntype parameter">&#8594; <a href="https://api.flutter.dev/flutter/dart-core/String-class.html">String</a></span>
  </span>
  

</dt>
<dd>
  A string representation of this object.
  <div class="features"><span class="feature">override</span></div>

</dd>

        <dt id="toVCard" class="callable">
  <span class="name"><a href="../properties_name/Name/toVCard.html">toVCard</a></span><span class="signature">(<wbr>)
    <span class="returntype parameter">&#8594; <a href="https://api.flutter.dev/flutter/dart-core/List-class.html">List</a><span class="signature">&lt;<wbr><span class="type-parameter"><a href="https://api.flutter.dev/flutter/dart-core/String-class.html">String</a></span>&gt;</span></span>
  </span>
  

</dt>
<dd>
  
  

</dd>

    </dl>
  </section>
    
  <section
      class="summary offset-anchor"
      id="operators">
    <h2>Operators</h2>
    <dl class="callables">
        <dt id="operator ==" class="callable">
  <span class="name"><a href="../properties_name/Name/operator_equals.html">operator ==</a></span><span class="signature">(<wbr><span class="parameter" id="==-param-o"><span class="type-annotation"><a href="https://api.flutter.dev/flutter/dart-core/Object-class.html">Object</a></span> <span class="parameter-name">o</span></span>)
    <span class="returntype parameter">&#8594; <a href="https://api.flutter.dev/flutter/dart-core/bool-class.html">bool</a></span>
  </span>
  

</dt>
<dd>
  The equality operator.
  <div class="features"><span class="feature">override</span></div>

</dd>

    </dl>
  </section>
    
    
    


  </div> <!-- /.main-content -->

  <div id="dartdoc-sidebar-left" class="sidebar sidebar-offcanvas-left">
    <header id="header-search-sidebar" class="hidden-l">
  <form class="search-sidebar" role="search">
    <input type="text" id="search-sidebar" autocomplete="off" disabled class="form-control typeahead" placeholder="Loading search...">
  </form>
</header>

<ol class="breadcrumbs gt-separated dark hidden-l" id="sidebar-nav">
  <li><a href="../index.html">flutter_contacts</a></li>
  <li><a href="../properties_name/properties_name-library.html">name</a></li>
  <li class="self-crumb">Name class</li>
</ol>


    <h5>name library</h5>
    <ol>
      <li class="section-title"><a href="../properties_name/properties_name-library.html#classes">Classes</a></li>
        <li><a href="../properties_name/Name-class.html">Name</a></li>








</ol>

  </div>

  <div id="dartdoc-sidebar-right" class="sidebar sidebar-offcanvas-right">
    <ol>

        <li class="section-title"><a href="../properties_name/Name-class.html#constructors">Constructors</a></li>
          <li><a href="../properties_name/Name/Name.html">Name</a></li>
          <li><a href="../properties_name/Name/Name.fromJson.html">fromJson</a></li>


        <li class="section-title">
          <a href="../properties_name/Name-class.html#instance-properties">Properties</a>
        </li>
          <li><a href="../properties_name/Name/first.html">first</a></li>
          <li><a href="../properties_name/Name/firstPhonetic.html">firstPhonetic</a></li>
          <li><a href="../properties_name/Name/hashCode.html">hashCode</a></li>
          <li><a href="../properties_name/Name/last.html">last</a></li>
          <li><a href="../properties_name/Name/lastPhonetic.html">lastPhonetic</a></li>
          <li><a href="../properties_name/Name/middle.html">middle</a></li>
          <li><a href="../properties_name/Name/middlePhonetic.html">middlePhonetic</a></li>
          <li><a href="../properties_name/Name/nickname.html">nickname</a></li>
          <li><a href="../properties_name/Name/prefix.html">prefix</a></li>
          <li class="inherited"><a href="https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html">runtimeType</a></li>
          <li><a href="../properties_name/Name/suffix.html">suffix</a></li>

        <li class="section-title"><a href="../properties_name/Name-class.html#instance-methods">Methods</a></li>
          <li class="inherited"><a href="https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html">noSuchMethod</a></li>
          <li><a href="../properties_name/Name/toJson.html">toJson</a></li>
          <li><a href="../properties_name/Name/toString.html">toString</a></li>
          <li><a href="../properties_name/Name/toVCard.html">toVCard</a></li>

        <li class="section-title"><a href="../properties_name/Name-class.html#operators">Operators</a></li>
          <li><a href="../properties_name/Name/operator_equals.html">operator ==</a></li>




</ol>

  </div><!--/.sidebar-offcanvas-->

</main>

<footer>
  <span class="no-break">
    flutter_contacts
      1.1.7+1
  </span>

  
</footer>



<script src="../static-assets/highlight.pack.js?v1"></script>
<script src="../static-assets/docs.dart.js"></script>



</body>

</html>

